<?php
header("Content-type: application/json");
$con = mysql_connect("localhost", "root", "");
if (!$con)
{
  die('Could not connect: ' . mysql_error());
} else {
   mysql_select_db("dutoan_db", $con);
 
   $rs = mysql_query("DELETE FROM Table WHERE Id = " . $_POST['models'][0]['Id']);
   if ($rs) {
        echo json_encode($rs);
  }
  else {
        header("HTTP/1.1 500 Internal Server Error");
        echo "Failed on delete: " . $_POST['models'][0]['Column1'];
  }
   mysql_close($con);
}
?> 